package com.tamtamy.jtta.data.xml;

import org.w3c.dom.Document;

import com.tamtamy.jtta.data.NetworkDetails;
import com.tamtamy.jtta.utility.XMLUtility;

public class XMLNetworkDetails extends NetworkDetails {
	
	public XMLNetworkDetails(Document xmlDocument) {
		super();
		this.id = XMLUtility.getString(xmlDocument, "id");
		this.network = XMLUtility.getString(xmlDocument, "name");
		this.creationDate = XMLUtility.getDate(xmlDocument, "creationDate");
		this.name = XMLUtility.getString(xmlDocument,"name");
		this.userCounter = XMLUtility.getString(xmlDocument, "userCounter");
		this.countentCounter = XMLUtility.getString(xmlDocument, "contentCounter");
		this.description =  XMLUtility.getString(xmlDocument, "description");
		this.permalink = XMLUtility.getString(xmlDocument, "permalink");
		this.chatEnabled = Boolean.parseBoolean(XMLUtility.getString(xmlDocument, "chatEnabled"));
	}

}
